{% extends 'base.html' %}
{% load static %}
{% block main %}
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>首页</title>
    </head>
    <body>
{#    <div class="index">#}
{#        {% if user.is_authenticated %}#}
{#            {{ current_time }}#}
{#            欢迎您：<em>{{ user.username }}</em>>#}
{#            <span>|</span>#}
{#            <a href="{% url 'auth_app:logout' %}" class="quit">退出</a>>#}
{#            <span>|</span>#}
{#            <a href="{% url 'auth_app:info' %}">用户中心</a>#}
{#        {% else %}#}
{#            <a href="{% url 'auth_app:login' %}">登录</a>#}
{#        {% endif %}#}
{#    </div>#}
    <div style="height: 30px;width: 100%;text-align:center;background:azure">
        <p style="width: 100%;height: 30px;margin-left:-400px">
            {% for leibie in leibie %}
                <span><a href="{% url 'goods:leixing' leibie.id %}" style="text-decoration: none;color: black">{{ leibie.name }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></span>
            {% endfor %}
        </p>
    </div>
    {% for good in shangpin %}
        <div style="display: inline-block;width:350px;margin:50px">
        {#<div style="float: left;width:350px;margin:50px" onclick=" window.open('www.baidu.com')">#}
            <img style="height: 300px;width: 250px" src="{{ MEDIA_URL }}/{{ good.image }}">
            <div>
                <a style="text-decoration: none;" href="{% url 'goods:detail' good.id %}">{{ good.name }}</a>
            </div>
            <label>{{ good.caption }} </label>
            <label style="color: coral">￥{{ good.price }}</label>
{#            <img src="{% static '小黑子.jpg' %}" style="width: 30px;height: 30px">#}
            <img src="{{ MEDIA_URL }}/{{ good.brand.logo }}" style="width: 30px;height: 30px">
            {# <a style="width: 30px;height: 30px"> 加入购物车</a>#}
            {# url 'commodity:detail' c.id#}
            {# <a href="goods:detail/{{ good.id }}" style="width:30px;height: 30px"> 加入购物车</a>#}
        </div>
    {% endfor %}
{% endblock main %}

{#{% for good in shangpin %}#}
{#    <div style="display: inline-block;width:350px;margin:50px">#}
{#        <img style="height: 300px;width: 250px" src="{{ MEDIA_URL }}/{{ good.image }}">#}
{#        <div>#}
{#            <img src="{{ MEDIA_URL }}/{{ good.brand.logo }}" style="width: 60px;height: 60px">#}
{#            <label>{{ good.name }} </label> <br/>#}
{#        </div>#}
{#        <div><label style="color: coral">￥{{ good.price }}</label></div>#}
{#        <div><label style="color: coral">简介 {{ good.caption }}</label></div>#}
{#        <div><label style="color: coral">库存 {{ good.stock }}</label></div>#}
{#        <div><label style="color: coral">已售 {{ good.sales }}</label></div>#}
{#        <div><label style="color: coral">评价数 {{ good.comments }}</label></div>#}
{#    </div>#}
{#{% endfor %}#}
</body>
</html>
